var app=angular.module("app",[]);
app.controller('controller1', ['$scope','$filter', function($scope,$filter){
	$scope.data=[
		{name:"刘备",age:20},
		{name:"关羽",age:19},
		{name:"张飞",age:18},
		{name:"赵云",age:70}
	];

	$scope.fnSort= function(arg){
		arguments.callee['fnSort'+arg] =!arguments.callee['fnSort'+arg];
		$scope.data = $filter('orderBy')($scope.data, arg, arguments.callee['fnSort'+arg]);
	};
}])